Skip to content

Conversation

andreiltd
Copy link
Member

The guest allocation wrapper aligned only the total memory block but did not guarantee that the pointer returned to the user was itself properly aligned. This patch attempts to fix that.

It also adds alloc_aligned function which would be tricky to implement outside the guest but will make implementing other posix like allocation API much easier.

@andreiltd andreiltd force-pushed the fix-guest-align-mem branch from 7aee0e0 to b81669d Compare July 31, 2025 14:39
@andreiltd andreiltd added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Jul 31, 2025
@andreiltd andreiltd marked this pull request as draft July 31, 2025 14:45
@andreiltd andreiltd force-pushed the fix-guest-align-mem branch 3 times, most recently from 0e3f72e to c623979 Compare July 31, 2025 16:18
@andreiltd andreiltd marked this pull request as ready for review July 31, 2025 16:38
@jsturtevant jsturtevant enabled auto-merge (squash) August 22, 2025 15:49
The guest allocation wrapper aligned only the total memory block but did
not guarantee that the pointer returned to the user was itself properly
aligned. This patch attempts to fix that.

It also adds alloc_aligned function which would be tricky to implement
outside the guest but will make implementing other posix like allocation
API much easier.

Signed-off-by: Tomasz Andrzejak <[email protected]>
@jsturtevant jsturtevant merged commit 2e29377 into hyperlight-dev:main Aug 25, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants